package com.laolang.shop.modules.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 商品属性
 *
 * @author khlbat
 * @version 1.0
 * @date 2020/11/4 14:29
 */
@Accessors(chain = true)
@Data
@TableName("product_attr")
public class ProductAttr {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long groupId;

    private String name;
    /**
     * 是否检索属性
     */
    private Integer searchType;
    /**
     * 属性值类型 <br />
     * <ul>
     *     <li>文本</li>
     *     <li>品牌</li>
     *     <li>颜色</li>
     *     <li>下拉框</li>
     *     <li>年份</li>
     *     <li>月份</li>
     * </ul>
     */
    private Integer valueType;
    private String icon;
    private Integer enableAttr;
    private Integer sort;
    private Integer multipleSelect;
    private Integer custom;

    /**
     * 三级分类id
     */
    private Long cateId;

    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    @Version
    private Integer version;
}
